package cn.demo1;

import java.sql.Connection;
import java.sql.DriverManager;

public class TestMysql {
    public static void main(String[] args) throws Exception {

        Class.forName("com.mysql.jdbc.Driver");

        Connection connection = DriverManager.getConnection("jdbc:mysql:///mysql", "root", "root");
        System.out.println(connection);

    }

}
